﻿namespace Charades.Web
{
	using System.Web.Optimization;

	public class BundleConfig
	{
		// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
		public static void RegisterBundles(BundleCollection bundles)
		{
			var common = new[]
			             {
				             "~/Scripts/jquery-{version}.js",
				              "~/Scripts/TweenMax.min.js",
				             "~/Scripts/topmenu.js"
			             };

			var jqueryval = new[]
			                {
				                "~/Scripts/jquery.validate*"
			                };

			var modernizr = new[]
			                {
				                "~/Scripts/modernizr.custom.js",
				                "~/Scripts/bowser.*"
			                };

			var uikit = new[]
			            {
				            "~/Scripts/uikit.*",
				            "~/Scripts/addons/notify.*"
			            };

			var signalr = new[]
			              {
				              "~/Scripts/jquery.signalR*",
				              "~/Scripts/signalr.hubs.js"
			              };

			var scripts = new[]
			              {
				              "~/Scripts/bjqs.min.js",
				              "~/Scripts/jquery.nouislider.js",
				              "~/Scripts/painter.js",
				              "~/Scripts/colpick.js",
				              "~/Scripts/social-likes.min.js",
				              "~/Scripts/ZeroClipboard.min.js"
			              };

			var app = new[]
			          {
				          "~/Scripts/ajax.js",
				          "~/Scripts/app/app.js"
			          };

			bundles.Add(new ScriptBundle("~/bundles/default")
				.Include(modernizr)
				.Include(common)
				.Include(jqueryval)
				.Include(uikit)
				.Include(scripts));

			bundles.Add(new ScriptBundle("~/bundles/index")
				.Include(modernizr)
				.Include(common)
				.Include(jqueryval)
				.Include(uikit)
				.Include(signalr)
				.Include(app)
				.Include(scripts));

			bundles.Add(new ScriptBundle("~/bundles/feed")
				.Include(common)
				.Include(uikit)
				.Include("~/Scripts/ajax.js", "~/Scripts/feed.js"));

			bundles.Add(new StyleBundle("~/Content/uikit").Include(
						"~/Content/normolize.css",
						"~/Content/uikit.almost-flat.*",
						"~/Content/addons/uikit.almost-flat.addons.*",
						"~/Content/Site.css"));

			bundles.Add(new StyleBundle("~/Content/css").Include(
						"~/Content/bjqs.css",
						"~/Content/jquery.nouislider.css",
						"~/Content/colpick.css",
						"~/Content/social-likes.css"));
		}
	}
}
